<template>
    <div class="child-wrapper">
        <h1>child component</h1>
        <div class="child-div">
            这是子组件中的div block
        </div>

        <div class="btn-wrapper">
            <span>获取的父组件信息: {{ attrs }}</span>
        </div>
    </div>

    <div>
        <h1>插槽的测试</h1>
        slot插槽内容: <slot></slot>
    </div>
</template>

<script setup>
defineOptions({
    inheritAttrs: true
});
import { useAttrs } from 'vue'
const attrs = useAttrs()

</script>